import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import Main from '../views/Main.vue'

Vue.use(VueRouter)

const routes = [{
		path: '/',
		redirect: '/login'
	},
	{
		path: '/login',
		component: Login
	},
	{
		path: '/main',
		component: Main,
		children: [{
			path: '/',
			redirect: '/WebHome'
		}, {
			path: '/webhome',
			component: () => import('../views/WebHome.vue')
		},{
			path: '/community',
			component: () => import('../views/Community.vue')
		},
		{
			path: '/store',
			component: () => import('../views/Store.vue')
		},
		{
			path: '/yizhan',
			component: () => import('../views/YiZhan.vue')
		},
		{
			path: '/goods',
			component: () => import('../views/Goods.vue')
		},
		{
			path: '/tiger',
			component: () => import('../views/Tiger.vue')
		},
		
		]
	},

	// {
	//   path: '/',
	//   name: 'home',
	//   component: HomeView
	// },
	// {
	//   path: '/about',
	//   name: 'about',

	//   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
	// }
]

const router = new VueRouter({
	routes
})

export default router